You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(3'' at line 1select pages.*,templates.file as template_file from pages left join templates on templates.id=pages.template_id where pages.status=1 and slug='666b158ef380a-Summer%20Sustainable%20Social%20Gatherin'%20(3'